package com.example.cloudtrade.fragment;


import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.example.cloudtrade.AddActivity;
import com.example.cloudtrade.AddActivity2;
import com.example.cloudtrade.R;

public class AddFragment extends Fragment {
    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        View view = inflater.inflate(R.layout.activity_add, container, false);
        ImageView imageView = view.findViewById(R.id.game_image1);
        imageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //跳转页面到AddActivity2
                Intent intent = new Intent(getActivity(), AddActivity2.class);
                startActivity(intent);
                Log.d("AddFragment", "Show bottom sheet button clicked");
            }
        });
        return view;
    }
}
